﻿using Microsoft.Windows.Controls.Ribbon;
using System.Windows;

namespace MDCAdminTool
{
    public static class MdcAPI
    {
        #region Cache Cluster-related Commands
        /// <summary>
        /// Sets the context of your PowerShell session to the desired cache cluster.
        /// When starting a PowerShell session on a cache host, this command runs automatically, 
        /// by using the connection parameters specified in the cache host configuration file.
        /// </summary>
        /// <param name="name">The name of the cache cluster.</param>
        /// <param name="provider">The provider that is used to store the cluster configuration settings.</param>
        /// <param name="connectionString">The connection string to the database.</param>
        public static void UseCacheCluster( string name , string provider , string connectionString )
        {
            
        }
        /// <summary>
        /// Starts all cache host services in the cluster. Lead hosts are started first.
        /// </summary>
        public static void StartCacheCluster()
        {
            
        }

        /// <summary>
        /// Stops all cache host services in the cluster.
        /// </summary>
        public static void StopCacheCluster()
        {
        }

        /// <summary>
        /// Restarts all cache host services in the cluster in the correct sequence.
        /// </summary>
        public static void RestartCacheCluster()
        {
        }

        /// <summary>
        /// This command exports the cluster configuration settings, as they currently exist in the cluster, 
        /// to the specified XML-based configuration file. This command can be used regardless of 
        /// where you chose to store your cluster configuration settings (SQL Server or shared network folder).
        /// </summary>
        /// <param name="file">The fully qualified path and name for the XML-based configuration file. If a file already exists by this name, it will be overwritten.</param>
        public static void ExportCacheClusterConfig( string file )
        {
        }

        /// <summary>
        /// This command imports the cluster configuration settings as described in the specified 
        /// XML-based configuration file. This command can be used regardless of where you chose to 
        /// store your cluster configuration settings (SQL Server or shared network folder).
        ///  You must restart the cluster with the Restart-CacheCluster for any changes to take effect.
        /// </summary>
        /// <param name="file">The fully qualified path and name of the XML-based configuration file that describes the cache cluster configuration settings to be applied to the cluster. </param>
        public static void ImportCacheClusterConfig( string file )
        {
        }

        #endregion

        #region Cache Host-related Commands
        /// <summary>
        /// Lists all cache host services that are members of the cache cluster.
        /// </summary>
        /// <returns>Lists all cache host services that are members of the cache cluster.</returns>
        public static string[] GetCacheHost()
        {
            return null;
        }

        /// <summary>
        /// Returns the configuration information about the specified cache host.
        /// </summary>
        /// <param name="hostName">The name of the cache host.</param>
        /// <param name="cachePort">The cache port number of the cache host.</param>
        /// <returns>Returns the configuration information about the specified cache host.</returns>
        public static string GetCacheConfig ( string hostName , string cachePort )
        {
            return null;
        }

        /// <summary>
        /// Updates the cache host configuration to the values specified in the command parameters.
        /// Example: Set-CacheConfig -HostName CacheServer1 -CachePort 22233 -LowWM 80 
        /// </summary>
        /// <param name="hostName">The name of the cache host.</param>
        /// <param name="cachePort">The current cache port number of the cache host. </param>
        /// <param name="clusterPort">The cluster port number that is used by the cache host.</param>
        /// <param name="newClusterPort">The new cache port number.</param>
        /// <param name="cacheSize">The total amount of memory allocated for storing data on the cache host, in units of megabytes (MB).</param>
        /// <param name="highWM">The high watermark percentage of memory, when eviction should begin evicting objects that have not yet expired.</param>
        /// <param name="lowWM">The low watermark percentage of memory, when eviction should begin evicting expired objects. After reaching HWM, when eviction should stop evicting objects that have not yet expired.</param>
        public static void SetCacheConfig( string hostName , int cachePort , int clusterPort , int newCachePort, int cacheSize, int highWM, int lowWM )
        {
        }

        /// <summary>
        /// Starts the specified cache host service. After a cache server reboot, this command is required 
        /// to allow the cache host service to re-join a running cache cluster.
        /// </summary>
        /// <param name="hostName">The name of the cache host.</param>
        /// <param name="cachePort">The cache port number of the cache host.</param>
        public static void StartCacheHost ( string hostName , int cachePort)
        {
        }

        /// <summary>
        /// Stops the specified cache host service.
        /// Note: The Stop-CacheHost command will not stop a cache host Windows service if it is 
        /// performing the cluster management role and stopping the cache host will cause the entire 
        /// cluster to shut down.
        /// </summary>
        /// <param name="hostName">The name of the cache host.</param>
        /// <param name="cachePort">The cache port number of the cache host.</param>
        public static void StopCacheHost( string hostName , int cachePort )
        {
        }

        /// <summary>
        /// Shows statistics for the specified cache host including: size (in bytes), number of caches, regions, cached objects, and cache misses.
        /// Note: See the next table for information about how to use this command with the CacheName parameter.
        /// </summary>
        /// <param name="hostName">The name of the cache host.</param>
        /// <param name="cachePort">The cache port number of the cache host.</param>
        public static string[] GetCacheStatistics( string hostName , int cachePort )
        {
            return null;
        }

        /// <summary>
        /// Lists all caches and regions that reside on the specified cache host.
        /// Note: See the next table for information about using this command with no parameters.
        /// </summary>
        /// <param name="hostName">The name of the cache host.</param>
        /// <param name="cachePort">The cache port number of the cache host.</param>
        public static string[] GetCache( string hostName , int cachePort )
        {
            return null;
        }

        /// <summary>
        /// Returns a list of all regions in the cache cluster or only those on a cache host, as specified by the HostName and CachePort parameters. Regions can only be created or removed by the cache client. But, the cache cluster controls on which cache host they will reside.
        /// Note: See the next table for information about how to use this command with the CacheName parameter.
        /// </summary>
        /// <param name="hostName">The name of the cache host.</param>
        /// <param name="cachePort">The cache port number of the cache host.</param>
        public static string[] GetCacheRegion( string hostName , int cachePort )
        {
            return null;
        }

        #endregion

        #region Cache-related Commands

        #endregion

        #region Console Management Commands

        #endregion

        
        
    }
}
